package com.example.LibrarySystem.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.LibrarySystem.pojo.BookClasses;
import com.example.LibrarySystem.pojo.Preeses;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface BookClassesMapper extends BaseMapper<BookClasses>{

    @Select("select * from book_classes where name like '%#{name}%'")
    public List<BookClasses> likeByName(String name);

    @Update("update book_classes set soft_del = 0 where id = #{id}")
    public int delById(int id);

}
